import { Injectable } from '@nestjs/common';
import { Organi } from './organi.entity';
import { DeepPartial, Repository } from 'typeorm';
import { InjectRepository } from '@nestjs/typeorm';

@Injectable()
export class OrganiService {
  constructor(
    @InjectRepository(Organi)
    private userRepository: Repository<Organi>,
  ) {}

  async create(entity: DeepPartial<Organi>): Promise<Organi> {
    const res = await this.userRepository.save(entity);
    return res;
  }

  findOne(id: number) {
    return `This action returns a #${id} organi`;
  }

  remove(id: number) {
    return `This action removes a #${id} organi`;
  }
}
